package edu.sctu.zhoumengxue.day201506.day20150607.train;



import java.io.IOException;
import java.util.Timer;

/**
 * Created by user12 on 2015/6/7.
 */
class Calculagrapher {
    public void getTime(){
        Timer timer = new Timer();
        timer.schedule(new DateNumber(),1000,2000);

        while (true){

            try {
                int ch = System.in.read();
                if(ch-'c'==0){
                    timer.cancel();

                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
